

/** 全局静态数据定义 */
export class Constants {
    public static readonly Event_EnemyAtk = "Event_EnemyAtk"; // 敌人攻击事件
    public static readonly Event_EnemyDead = "Event_EnemyDead"; // 敌人死亡事件
    public static readonly Event_FortressAtk = "Event_FortressAtk"; // 要塞攻击事件
    public static readonly update_fortress_level = "update_fortress_level"; // 要塞等级更新事件
    public static readonly Event_OrientationChange = "Event_OrientationChange"; // 屏幕方向变化事件
    public static enemyCoin: number = 5;
}


export enum EnemyType {
    MINION_1,   // 随从1(小黑皮)
    MINION_2,   // 随从2(小石头人)
    BOSS        // BOSS(大石头人)
}


export interface FortressConfig {
    level: number;        // 要塞等级
    atk: number;          // 攻击力
    def: number;         // 防御力
    atkSpeed: number;     // 攻击速度(秒)
    atkRange: number;     // 攻击范围
    maxHp: number;        // 最大生命值
    upgradeCost: number;  // 升级费用
}

export const FortressConfigs: FortressConfig[] = [
    { level: 1, atk: 100, def: 10, atkSpeed: 1, atkRange: 100, maxHp: 100, upgradeCost: 500 },
    { level: 2, atk: 200, def: 20, atkSpeed: 0.7, atkRange: 100, maxHp: 100, upgradeCost: 500 },
    { level: 3, atk: 300, def: 30, atkSpeed: 0.5, atkRange: 100, maxHp: 100, upgradeCost: 500 },
    { level: 4, atk: 400, def: 40, atkSpeed: 0.1, atkRange: 100, maxHp: 100, upgradeCost: 500 },
]

export enum Orientation {
    Landscape,  // 横屏
    Portrait    // 竖屏
}